/**  
 * All rights Reserved, Designed By www.flksh.com
 * @date:   2017-11-03 10:27:10   
 * @Copyright: 2013-2017 www.flksh.com Inc. All rights reserved. 
 * 注意：本内容仅限于上海福乐康社区养老服务有限公司内部传阅，禁止外泄以及用于其他的商业目
 */
package com.zx.cloud.controller;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.zx.cloud.ApiVersion;
import com.zx.cloud.RequestLogging;
import com.zx.cloud.common.filter.IgnoreAuth;
import com.zx.cloud.domain.Client;
import com.zx.cloud.domain.Provinces;
import com.zx.cloud.model.response.ObjectDataResponse;
import com.zx.cloud.model.response.Response;
import com.zx.cloud.service.ProvincesService;

import io.swagger.annotations.ApiOperation;

/**
 * 省市区信息查询
 * @author  Yan Weiwei
 * @version 创建时间：2017年11月3日 上午11:03:03
 *
 */
@RestController
@RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/client")
public class ProvincesController{

	private static final Logger logger=Logger.getLogger(ProvincesController.class);
	
	@Autowired
	private ProvincesService provincesService;
	
	@IgnoreAuth
	@RequestLogging
	@ApiOperation(value = "查询省市区信息" , notes = "查询省市区信息")
	@RequestMapping(value = "/provinceMsg", method = RequestMethod.POST)
	@ResponseBody
	public Response provinceMsg(@RequestBody  Client client){
		
		List<Provinces> datas = provincesService.findGlobalMsg();
		
		return new ObjectDataResponse<List<Provinces>>(datas);
	}
}
